<% @project_list ||= Project.pluck(:permalink, :name).to_h %>
<tr>
  <td><%= parts.fetch(:environment_permalink) %></td>
  <td>
    <% permalink = parts.fetch(:project_permalink) %>
    <% if name = @project_list[permalink] %>
      <%= link_to name, project_path(permalink) %>
    <% elsif permalink == 'global' %>
      Global
    <% else %>
      <%= permalink %>
    <% end %>
  </td>
  <td><%= parts.fetch(:deploy_group_permalink) %></td>
  <td title="<%= id %>"><%= parts.fetch(:key) %></td>
  <td>
    <%= link_to "Edit", secret_path(id) %> |
    <%= link_to_delete(secret_path(id), remove_container: 'tr', question: "Delete #{id} ?") %> |
    <%= content_tag :span, icon_tag("eye-open"), title: "Visible" if secret_stub.fetch(:visible) %>
    <%= if deprecated_at = secret_stub[:deprecated_at]
          content_tag :span, icon_tag("warning-sign"), title: "Deprecated #{deprecated_at}"
        end
    %>
  </td>
</tr>
